<div class="search">
    <input type="text" class="form_input" [(ngModel)]="keyword" (keyup)="doAdd($event)"/> <button (click)="doSearch()" class="input_button">搜索</button>

<hr>
<ul>
    <li *ngFor="let item of historyList;let key=index">{{item}}   -----<button (click)="deleteHistory(key)">X</button></li>
</ul>
<hr>
<h3>待办事项</h3>
<ul>
    <li *ngFor="let item of todoList;let key=index" [hidden]="item.status==1">
        <input type="checkbox" [(ngModel)]="item.status"/>
        {{item.title}}   -----<button (click)="deleteData(key)">X</button></li>
</ul>

<h3>已完成事项</h3>
<ul>
    <li *ngFor="let item of todoList;let key=index" [hidden]="item.status==0">
        <input type="checkbox" [(ngModel)]="item.status"/>
        {{item.title}}   -----<button (click)="deleteData(key)">X</button></li>
</ul>
</div>
